package com.yangguang.huahui.mvp.presenter;

import com.yangguang.huahui.entity.Attention;
import com.yangguang.huahui.mvp.model.CommonModel;
import com.yangguang.huahui.mvp.view.HomeView;
import com.yangguang.huahui.rx.RxManager;
import com.yangguang.huahui.rx.RxSubscriber;


/**
 * Created by Administrator on 2017/3/2.
 */

public class HomePresenter extends BasePresenter<HomeView>{
    CommonModel commonModel;

    public HomePresenter() {
        commonModel = new CommonModel();
    }
    public void getTabs(){
        mSubscription = RxManager.getInstance().doSubscribe(commonModel.getTabs(), new RxSubscriber<Attention>(false) {
            @Override
            protected void _onNext(Attention attention) {
                mView.onTabs(attention);
            }

            @Override
            protected void _onError() {
                mView.onError();
            }
        });
    }
}
